﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class APP_Controls_ForecastPost_dlt : System.Web.UI.UserControl
{
    protected List<Model.ForecastPost> forecastDa;
    protected decimal winmonenyTotal = 0;

    protected List<Model.UsersAccount> userAccount = null;
    protected decimal jiangjin2 = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            bind();
        }
    }
    void bind()
    {
        string sqlDa = "";
        
        sqlDa = " and LotteryType=2 ";
        int totalCount4 = 0;
        forecastDa = BLL.ForecastPost.GetPageListBysql(0, 20, sqlDa, out totalCount4);
        int totalCount2 = 0;
        userAccount = BLL.UsersAccount.getList(0, int.MaxValue, out totalCount2);
        foreach (Model.UsersAccount user in userAccount)
        {
            winmonenyTotal += user.winTotal;
        }
        jiangjin2 = Convert.ToDecimal(winmonenyTotal) / 100000000;

    }
    public string SelectName(object Uid)
    {
        Model.CMember cm = BLL.CMember.GetModel(Convert.ToInt32(Uid));
        if (cm != null)
        {
            return cm.nickname;//用户真实姓名
        }
        else
        {
            return "***";
        }
    }
}